<?php
class UsuariosFinalesView extends CustomView
{

    public function listarUsuariosFinales($vars)
    {
        $this->top();
        $this->setTemplate('listar');
        $this->parse('listar', $vars);
        {
            if (!empty($vars['results']))
            {
                $vars['pagination'] = $this->buildPagination($vars['pagination_link'], $vars['results']);
                $this->parse('results', $vars);
                foreach($vars['results']['results'] as $result)
                {
                    $result['register_date'] = date('d/m/Y H:i:s', $result['creation_timestamp']);
                    if (!empty($result['log_timestamp']))
                    {
                        $result['last_login_date'] = date('d/m/Y H:i:s', $result['log_timestamp']);
                    }
                    else
                    {
                        $result['last_login_date'] = 'No ingres&oacute;';
                    }
                    $this->parse('usuario', $result);
                }
                $this->parse('results', $vars);
            }
        }
        $this->parse('listar', $vars);
        $this->bottom();
    }


}
?>